The Movie Toolbox contains two functions for maintaining media input maps: GetMediaInputMap and SetMediaInputMap .
Each track has particular attributes such as size, position, and volume associated with it. The media input map of that track describes where the variable parameters are stored so that modifier tracks know where to send their data. When a track is copied, its input map is also copied. CopyTrackSettings also transfers the media input map.
The GetMediaInputMap function returns a copy of the input map associated with the specified media. The caller is responsible for disposing of the input map with QTDisposeAtomContainer .
pascal OSErr GetMediaInputMap (
Media theMedia,
QTAtomContainer *inputMap);
The SetMediaInputMap function replaces the media's existing input map with the given input map.
pascal OSErr SetMediaInputMap (
Media theMedia,
QTAtomContainer inputMap);
Use the SetMediaInputMap function to specify the media you want to set so you can modify or empty its input map.
SetMediaInputMap makes a copy of the inputMap passed to it. Typically, an application will call GetMediaInputMap to get the current input map before modifying it. Use QTNewAtomContainer to create an empty input map. See the description of QTNewAtomContainer later in this chapter.